package cn.stylefeng.guns.modular.system.mapper;

import cn.stylefeng.guns.modular.system.entity.InventoryOrder;
import cn.stylefeng.guns.modular.system.model.params.InventoryOrderParam;
import cn.stylefeng.guns.modular.system.model.result.InventoryOrderResult;
import cn.stylefeng.guns.modular.system.model.result.resultVO.InventoryVO;
import cn.stylefeng.guns.sys.modular.system.model.result.ResultVO.InventoryOrderVO;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;
import org.springframework.stereotype.Repository;

import java.util.List;
import java.util.Map;

/**
 * <p>
 * 库存表 Mapper 接口
 * </p>
 *
 * @author 小飞
 * @since 2019-06-28
 */
@Repository
public interface InventoryOrderMapper extends BaseMapper<InventoryOrder> {

    /**
     * 获取列表
     *
     * @author 小飞
     * @Date 2019-06-28
     */
    List<InventoryOrderResult> customList(@Param("paramCondition") InventoryOrderParam paramCondition);

    /**
     * 获取map列表
     *
     * @author 小飞
     * @Date 2019-06-28
     */
    List<Map<String, Object>> customMapList(@Param("paramCondition") InventoryOrderParam paramCondition);

    /**
     * 获取分页实体列表
     *
     * @author 小飞
     * @Date 2019-06-28
     */
    Page<InventoryOrderVO> customPageList(@Param("page") Page page, @Param("paramCondition") InventoryOrderParam paramCondition);

    /**
     * 获取分页map列表
     *
     * @author 小飞
     * @Date 2019-06-28
     */
    Page<Map<String, Object>> customPageMapList(@Param("page") Page page, @Param("paramCondition") InventoryOrderParam paramCondition);


    /**
     * 小程序查看门店库存
     * @param page
     * @param warhouseId
     * @return
     */
    Page<InventoryVO> getInventoryList(@Param("page") Page page,@Param("warhouseId") Long warhouseId);

    Page<InventoryVO> getInventory(@Param("page") Page page,@Param("ids") List<Long> ids);


    /**
     * 根据商品的序列号进行查询
     */
    InventoryOrderResult getInventoryOrderId(@Param("serialNum") String serialNum);



}
